Device-to-device (D2D) communication is a technology that enables direct communication between terminal devices. This technology can increase communications system spectral efficiency, reduce transmit powers of terminal devices, and resolve a problem of spectral resource shortage in a wireless communications system to some extent. The D2D technology has already been introduced in a Long Term Evolution (LTE) technology.
D2D discovery is a necessary premise for establishing and completing D2D transmission. That is, a terminal device (such as a D2D station) with a D2D function needs to perform D2D neighbor discovery, to establish a D2D communication link. At present, in a licensed frequency band application scenario, for example, the proximity-based peer-to-peer (P2P) computing communications technology (FlashLinQ) launched by Qualcomm Incorporated, D2D stations all can send and receive a D2D discovery frame on an allocated resource. The resource may be a segment of D2D discovery timeslot. For example, the resource can be divided, by using an orthogonal frequency division multiplexing (OFDM) technology, into multiple orthogonal resources, that are, multiple D2D discovery timeslots at smaller frequency bands. That is, whether performing D2D transmission or not, all the D2D stations need to perform D2D discovery at a fixed period on the allocated resource.
However, in a D2D station discovery manner in the prior art, a D2D station performs D2D discovery at a fixed period, and consequently, energy consumption of the D2D station is relatively large.